<? //include"cek_sesi.php"; ?>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Laporan Catatan Pelatihan Perusahaan</title>
<style type="text/css"></style>
<link href="../lib/styles.css" rel="stylesheet" type="text/css">

</head>

<body>
<p>

  <? include"../koneksi/koneksi.php"; ?>
</p>
<table style="border-collapse: collapse;" width="820" border="1" bordercolor="#cccccc" cellpadding="3" cellspacing="0" align="center">
  <tr>
    <td>

<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td><table width="90%" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td width="13%"><img src="../gambar/logo.png" alt="logo" width="74" height="76" /></td>
        <td width="87%" class="texttitle02C"><div align="center" class="texttitle02E">
          <div align="left" class="texttitle02B">&nbsp;&nbsp;&nbsp;PT. PARDIC JAYA CHEMIVAL</div>
        </div></td>
      </tr>
      <tr>
        <td colspan="2"><hr color="#CCCCCC" size="1" /></td>
        </tr>
    </table></td>
  </tr>
  <tr>
    <td><table width="99%" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr> 	  
        <td width="64%" height="35"><table width="100%" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td width="5%">&nbsp;</td>
            <td width="14%" class="texttitle1ungu"><div align="left"></div></td>
            <td width="2%"><div align="center"></div></td>
            <td width="49%"><div align="left"></div></td>
            <td width="30%"><span class="texttitle1ungu">Tangerang,</span> <? echo date('j F Y');?> </td>
          </tr>
          <tr>
            <td>&nbsp;</td>
            <td class="texttitle1ungu"><div align="left">Perihal</div></td>
            <td><div align="center">:</div></td>
            <td><div align="left">Laporan  Evaluasi Hasil Pelatihan</div></td>
            <td>&nbsp;</td>
          </tr>
          <tr>
            <td>&nbsp;</td>
            <td class="texttitle1ungu">Periode</td>
            <td><div align="center">:</div></td>
            <td><?
$tgl_indo1=$tanggal1.'-'.$bulan1.'-'.$tahun1;
$tgl_indo2=$tanggal2.'-'.$bulan2.'-'.$tahun2;
//menyesuaikan format tgl dng format tgl di mysql
$tgl_mysql1=$tahun1.'-'.$bulan1.'-'.$tanggal1;
$tgl_mysql2=$tahun2.'-'.$bulan2.'-'.$tanggal2;
echo"$tgl_indo1 s/d $tgl_indo2"; ?></td>
            <td>&nbsp;</td>
          </tr>
          <tr>
            <td>&nbsp;</td>
            <td class="texttitle1ungu">&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
          </tr>
          <tr>
            <td></td>
            <td colspan="4" height="10"></td>
          </tr>
          <tr>
            <td colspan="5">
			
              <table width="99%" border="1" align="center" style="border-collapse: collapse;" bordercolor="#cccccc">
                
                <tr bgcolor="#000080" class="textmenu4a">
                  <td width="6%"><div align="center">No</div></td>
                  <td width="13%"><div align="center">No. Training</div></td>
                  <td width="29%"><div align="center">Jenis Pelatihan</div></td>
      <td width="14%"><div align="center">Tgl Pelatihan</div></td>
      <td width="26%"><div align="center"> Peserta</div></td>
      <td width="12%"><div align="center">Trainer</div></td>
                </tr>
                <tr class="texttitle">
  <?
 $limit=200;
 if(empty($halaman)){
 $offset=0;
 $halaman=1;}
 else{
 $offset=($halaman-1) * $limit; }
 
 $tampil=mysql_query("select * from karyawan k, training t, seksi s, detail_training dt,
 					materi m, jobdesc_kualifikasi jk
					where
					k.kd_seksi=s.kd_seksi and
					dt.nik=k.nik and t.no_training=dt.no_training and m.kd_materi=jk.kd_materi and jk.nodet_jobdesc=t.nodet_jobdesc
					and	t.tgl_training between '$tgl_mysql1' and '$tgl_mysql2' group by t.no_training
					limit $offset,$limit");
 $no=0;
 while($ada=mysql_fetch_array($tampil))
 {
 	if($j==0){
	echo"<tr bgcolor=#eeedee>";
	$j++;}
	else{
	echo"<tr bgcolor='#ffffff'>";
	$j--;}
	$no++;
?> 

                  <td align="left" valign="top" class="texttitle14"><div align="center"><? echo"$no"; ?></div></td>
                  <td align="left" valign="top" class="texttitle14"><div align="center"><? echo"$ada[no_training]"; ?></div></td>
                  <td align="left" valign="top" class="texttitle14"><? echo"$ada[nm_materi]"; ?></td>
      <td align="left" valign="top" class="texttitle14"><div align="center"><? echo"$ada[tgl_training]"; ?></div></td>
	  <td align="left" valign="top" class="texttitle14"><div align="left"><? include"peserta_training.php";?></div></td>
      <td align="left" valign="top" class="texttitle14"><div align="center"><? include"nm_trainer.php";?></div></td>
      </tr>
<? } ?>              
       </table>
		  			  </td>
            </tr>
          <tr>
            <td colspan="5"></td>
            </tr>
          <tr>
            <td colspan="5"></td>
            </tr>
        </table>		</td>
        </tr>
    </table></td>
  </tr>
  <tr>
    <td>
<table width="99%" border="0" align="center" style="border-collapse: collapse;" bordercolor="#cccccc">   
<tr>
<?
$lihat2=mysql_query("select * from karyawan k, training t, seksi s, detail_training dt
					where
					k.kd_seksi=s.kd_seksi and
					dt.nik=k.nik and t.no_training=dt.no_training
					and	t.tgl_training between '$tgl_mysql1' and '$tgl_mysql2' group by t.no_training");
$jumbaris=mysql_num_rows($lihat2);
?>
<td width="4%"><div align="left"><span class="texttitle14">&nbsp;Jumlah Training : <? echo"$jumbaris"; ?></span></div></td>
</tr>
</table>
	
	
	
	</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td><table width="90%" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td width="45%">
          <div align="left" class="texttitle12">Dibuat Oleh,        </div></td>
        <td width="39%"><div align="right" class="texttitle12">&nbsp;</div></td>
        </tr>
      <tr>
        <td><p align="left">
		<? if($level="admin"){
	       echo"Bag.Administrasi";}	
		   elseif($level="departemen_head"){
		   echo"Departemen Head";}
		 ?>
		</p></td>
        <td class="texttitle12">&nbsp;</td>
        </tr>
      <tr>
        <td><div align="left"></div></td>
        <td class="texttitle12"><div align="right" class="style14"></div></td>
        </tr>
      <tr>
        <td height="29"><div align="left"></div></td>
        <td>&nbsp;</td>
        </tr>
      <tr>
<?
$tampil2=mysql_query("select k.nm_karyawan from karyawan k,admin a
					where k.nik=a.nik and a.nik='$nomor_induk_karyawan'");
$hs2=mysql_fetch_array($tampil2);
{ ?> 	  
	  
        <td><p align="left">( <b><? echo"$hs2[nm_karyawan]"; ?></b> )</p></td>
        <td>&nbsp;</td>
        </tr>
<? } ?>
      <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        </tr>
      <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        </tr>
    </table></td>
  </tr>
</table>


</td>
  </tr>
</table>
</body>
</html>
